//
//  SHYViewController.m
//  SHYRouter
//
//  Created by [sunhaiyan] on 06/20/2016.
//  Copyright (c) 2016 [sunhaiyan]. All rights reserved.
//

#import "SHYViewController.h"

@interface SHYViewController ()

@end

@implementation SHYViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"shy";
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(100, 100, 200, 30);
    button.backgroundColor = [UIColor colorWithWhite:0.7 alpha:1];
    [button addTarget:self action:@selector(pushView) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)pushView {
    //    NSURL *url = [[SHYSchemaManager defaultManager] schemaUrlForTabName:SHYSchemaRouterNodeHeaderTab1 moduleName:SHYSchemaRouterNodeHeaderModule1 paramDict:nil];
    
    NSURL *url = [self schemaUrlForTabName:SHYSchemaRouterNodeHeaderTab1 moduleName:@"shysecond" paramDict:@{@"key": @"value"}];
    
    [[SHYRouter sharedInstance] pushToUrl:url];
    
}



+ (void)load {
//    [[SHYSchemaManager defaultManager] registerWithTabName:SHYSchemaRouterNodeHeaderTab1 moduleName:SHYSchemaRouterNodeHeaderModule1 class:self.class];
}

@end
